home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
misc
/
emu
/
ATUtilities.lha
/
ATUtilities
/
BASIC
/
BINARY.BAS
< prev
next >
Wrap
BASIC Source File
|
2000-09-26
|
343b
|
27 lines
cls
locate ,10
print "76543210"
while inkey$<>chr$(27)
def seg = &H40
locate 2,1
call bin(peek(&H17))
locate 3,1
call bin(peek(&H18))
wend
end
sub bin(x) static
y=x
print y;
locate ,10
for i=7 to 0 step -1
if y>=(2^i) then
print "1";
y=y-(2^i)
else
print "0";
end if
next
print ""
end sub